﻿namespace MapleRock.P2PEmulator.Core
{
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Net;
  using System.Text;

  public sealed class MessageSearchResponse : Message
  {
    public MessageSearchResponse(ulong uid, IPAddress respondentAddress, Guid requestId)
      : base(uid)
    {
      this.RequestId = requestId;
      this.RespondentAddress = respondentAddress;
    }

    public Guid RequestId { get; private set; }

    public IPAddress RespondentAddress { get; private set; }

    public override int Size
    {
      get { return 16; }
    }

    public override Message Duplicate(ulong uid)
    {
      var clone = new MessageSearchResponse(uid, this.RespondentAddress, this.RequestId);
      return clone;
    }
  }
}
